<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Myth APItest</title>

    <style>
        .res{
            border: 1px solid #000000;
            width: 100%;
            height: 200px;
            overflow-y: auto;
        }

    </style>
</head>
<body onload="load()">
<h1>Myth API testing V1.0</h1>

<h2>## 用户管理</h2>
<h3>### 1.用户登录</h3>
<form id="LoginForm" >
用户名：<input type="text" name="username"><br>
密码：<input type="password" name="password"><br>
    <input type="button" value="submit" onclick="login()">
</form>
result：<pre id="LoginRes" class="res"></pre>


<h3>### 2.查看所有用户</h3>
<form id="UserListAllForm" >
    <input type="button" value="submit" onclick="userListAll()">
</form>
result：<pre id="UserListAllRes" class="res"></pre>


<h3>### 3.根据类型查看用户(1~9)</h3>
<form id="UserListByUserTypeForm" >
    <select type="text" name="userType">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
    </select>
    <input type="button" value="submit" onclick="userListByUserType()">
</form>
result：<pre id="UserListByUserTypeRes" class="res"></pre>


<h3>### 4.创建用户</h3>
<form id="UserAddForm" >
    用户名：<input type="text" name="username"><br>
    密码：<input type="password" name="password"><br>
    确认密码：<input type="password" name="passwordAgain"><br>
    用户类型：
    <select type="text" name="userType">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
    </select><br>
    真实姓名：<input type="text" name="realName"><br>
    电子邮箱：<input type="email" name="email"><br>
    <input type="button" value="submit" onclick="userAdd()">
</form>
result：<pre id="UserAddRes" class="res"></pre>



<h2>## model管理</h2>
<h3>### 1.model 创建</h3>
<form id="ModelAddForm" >
    model name: <input type="text" name="name"><br>
    model description：<textarea name="description" id="" cols="30" rows="10"></textarea><br>
    <input type="button" value="submit" onclick="modelAdd()">
</form>
result：<pre id="ModelAddRes" class="res"></pre>


<h3>### 2.查看所有model</h3>
<form id="ModelListAllForm" >
    <input type="button" value="submit" onclick="modelListAll()">
</form>
result：<pre id="ModelListAllRes" class="res"></pre>


<h3>### 3.查看当前用户的model</h3>
<form id="ModelListMineForm" >
    <input type="button" value="submit" onclick="modelListMine()">
</form>
result：<pre id="ModelListMineRes" class="res"></pre>


<h3>### 4.查看指定用户的model</h3>
<form id="ModelListByOwnerForm" >
    输入用户名：<input type="text" name="owner">
    <input type="button" value="submit" onclick="modelListByOwner()">
</form>
result：<pre id="ModelListByOwnerRes" class="res"></pre>


<h3>### 4.查看指定model</h3>
<form id="ModelByUuidForm" >
    model uuid：<input type="text" name="uuid">
    <input type="button" value="submit" onclick="modelByUuid()">
</form>
result：<pre id="ModelByUuidRes" class="res"></pre>


<h3>### 5.更新 model </h3>
<form id="ModelUpdateForm" >
    uuid：<input type="text" name="uuid"><br>
    modelString： <textarea name="modelString" cols="30" rows="10"></textarea><br>
    <input type="button" value="submit" onclick="ModelUpdate()">
</form>
result：<pre id="ModelUpdateRes" class="res"></pre>







<h2>## job 管理</h2>
<h3>### 1.job 创建</h3>
<form id="JobAddForm" >
    job name: <input type="text" name="name"><br>
    model uuid：<input type="text" name="model"><br>
    job parameters：<textarea name="parameters" cols="30" rows="10"></textarea><br>
    <input type="button" value="submit" onclick="jobAdd()">
</form>
result：<pre id="JobAddRes" class="res"></pre>



<script type="text/javascript" src="/js/vendors/jquery-1.9.1.js"></script>
<script type="text/javascript" src="/js/APITest/test.js"></script>

</body>
</html>